home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 656 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.4 KB

  1. Path: hermes.louisville.edu!starbase!jmsche01
  2. From: jmsche01@starbase.spd.louisville.edu (James M. Scherer)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Trig functions
  5. Date: 5 Jan 1996 16:42:12 GMT
  6. Organization: University of Louisville, Louisville KY USA
  7. Message-ID: <4cjkd4$hb1@hermes.louisville.edu>
  8. References: <4ch9ka$4pc@felix.junction.net>
  9. NNTP-Posting-Host: starbase.spd.louisville.edu
  10. X-Newsreader: NN version 6.5.0 CURRENT #16
  11.  
  12. heppner@portage.net (Donald Heppner) writes:
  13.  
  14. >I need to have a few trig functions in my C++ program.  I have found 
  15. >some trig functions, but for some reason, they give the wrong answer
  16. >(Maybe a different kind of trig).  I need tan, cos, sin, and all of these
  17. >functions to the power of negative one.  I need them to give me the same 
  18. >answer as a calculator would.
  19.  
  20. Trig notation is a little confusing.  What looks like a trig function raised
  21. to the power of negative one is the standard notation for the arc-function.
  22. That is, the function gives a value for a given angle; the arc-function
  23. returns the angle for the input value.  This is sometimes confused with the
  24. function raised to the power of negative one, which would be one divided by
  25. the function.
  26.  
  27. One reason the output of the arcsine, arctan, etc. functions may not be the
  28. same as the output of your calculator is that the output of these functions
  29. is in radians by standard and your calculator might be set to output in
  30. degrees.  A degree is pi/180 radians.
  31.  
  32. Mitch
  33.  
  34.